package StudyCode.summary.mycollection;

import java.util.Iterator;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class iterableCount {
	public static int iterableCount(Iterable<?> i) {
		int count = 0;
		Iterator<?> it = i.iterator();
		while (it.hasNext()) {
			it.next();
			count++;
		}

		return count;
	}
}
